<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ca="http://java.sun.com/jsf/composite/cashSummery"                
                xmlns:pe="http://primefaces.org/ui/extensions">

    <ui:define name="content">
        <h:outputStylesheet library="css" name="printing.css"></h:outputStylesheet>
        
        <h:form id="panelPrint" styleClass="noBorder summeryBorder">

            <p:panel>
                <f:facet name="header" >

                    <p:commandButton value="Refresh" ajax="false"  styleClass="noPrintButton" style="float: right;"
                                    action="#{cashSummeryControllerExcel1.createCashCategoryWithoutPro}"/>

                    <p:commandButton ajax="false" value="Print"  styleClass="noPrintButton" style="float: right;" >
                        <p:printer target="panelPrint" />
                    </p:commandButton>
                    <p:commandButton actionListener="#{cashSummeryControllerExcel1.createCashCategoryWithoutPro}" value="Excel" ajax="false" styleClass="noPrintButton" style="float: right;">
                        <pe:exporter type="xlsx" target="opd,other,pharmacy,
                                     agent,inwProf,col,dept,card,slip,cheque,finalSum" fileName="Book_Keeping_Summery"
                                     facetFontStyle="BOLD"   cellFontStyle="NORMAL"  
                                     fontName="Courier New"  />
                    </p:commandButton>

                    <h:panelGrid columns="6"  styleClass="noPrintButton" style="min-width: 100%;" >
                        <h:outputLabel value="From Date"/>
                        <p:calendar id="frmDate" value="#{cashSummeryControllerExcel1.fromDate}" navigator="true"  pattern="dd MM yyyy HH:mm:ss" >
                        </p:calendar>

                        <h:outputLabel value="To Date"/>
                        <p:calendar id="toDate" value="#{cashSummeryControllerExcel1.toDate}" navigator="true" pattern="dd MM yyyy HH:mm:ss" >
                        </p:calendar>

                        <h:outputLabel value="Select Institution"/>

                        <p:autoComplete completeMethod="#{institutionController.completeCompany}" required="true" 
                                        forceSelection="true"
                                        requiredMessage="Please Select Institution" value="#{cashSummeryControllerExcel1.institution}"
                                        var="pta" itemLabel="#{pta.name}" itemValue="#{pta}" />
                    </h:panelGrid>

                </f:facet>
            </p:panel>
            <!--            <p:spacer height="30" />-->

            <p:dataTable id="opd"  value="#{cashSummeryControllerExcel1.dailyCashExcel}" var="d" 
                         rendered="#{cashSummeryControllerExcel1.dailyCashExcel.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">                   
                <f:facet name="header">
                    <h:panelGrid columns="2" styleClass="printBlock" style="min-width: 100%;">
                        <p:outputLabel value="#{sessionController.institution.name}"/><h:outputLabel/>
                        <p:outputLabel value="Book Keeping Summary"/><h:outputLabel/>   
                        <h:outputLabel/><h:outputLabel/>
                        <h:panelGroup>
                            <h:outputLabel value="From : "  />
                            <h:outputLabel  value="#{cashSummeryControllerExcel1.fromDate}" >
                                <f:convertDateTime pattern="dd MM yy HH:mm:ss a"/>
                            </h:outputLabel>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:outputLabel value="To : "/>
                            <h:outputLabel  value="#{cashSummeryControllerExcel1.toDate}" style="float: right" >
                                <f:convertDateTime pattern="dd MM yy HH:mm:ss a"/>
                            </h:outputLabel>
                        </h:panelGroup>
                    </h:panelGrid>
                    <h:outputLabel value="OPD Service"/>     

                </f:facet>       
                <p:column headerText="Item Name" style="text-align: left;">
                    <h:outputLabel value="#{d.string}" rendered="#{d.summery eq false}" />
                    <h:outputLabel value="#{d.string}" rendered="#{d.summery eq true}" style="font-weight: bold;" />
                </p:column>                   
                <p:column headerText="Count">
                    <h:outputLabel value="#{d.value1}" rendered="#{d.summery eq false}" />
                </p:column>
                <p:column style="text-align: right;"  headerText="Hospital Fee">                               
                    <h:outputLabel value="#{d.value2}" rendered="#{d.summery eq false}" >
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>


                </p:column>    
                <p:column headerText="Sub Total" style="text-align: right;">
                    <h:outputLabel value="#{d.value2}" rendered="#{d.summery eq true}" style="font-weight: bold;">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>

                </p:column>
                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="3" footerText="Total OPD Service Collection"/>
                        <p:column style="text-align: right;" footerText="#{cashSummeryControllerExcel1.opdHospitalTotal}" >
                            <f:facet name="footer">
                                <h:outputLabel value="#{cashSummeryControllerExcel1.opdHospitalTotal}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>


            </p:dataTable> 

            <p:spacer height="30"/>

            <p:dataTable id="other" value="#{cashSummeryControllerExcel1.otherInstitution}" var="th" 
                         rendered="#{cashSummeryControllerExcel1.otherInstitution.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <p:column>
                    <h:outputLabel value="#{th.string}"/>
                </p:column>
                <p:column style="text-align: right;">
                    <f:facet name="header">
                        <h:outputLabel value="Hospital Fee"/>
                    </f:facet>
                    <h:outputLabel value="#{th.value1}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>
                <p:column style="text-align: right;">
                    <f:facet name="header">
                        <h:outputLabel value="Professional Fee"/>
                    </f:facet>
                    <h:outputLabel value="#{th.value2}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>
                <p:column style="text-align: right;">
                    <f:facet name="header">
                        <h:outputLabel value="Total Fee"/>
                    </f:facet>                
                    <h:outputLabel value="#{th.value3}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>
            </p:dataTable>

            <p:spacer height="30"/>

            <p:dataTable id="pharmacy" value="#{cashSummeryControllerExcel1.pharmacySales}" var="dep"
                         rendered="#{cashSummeryControllerExcel1.pharmacySales.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">
                    <h:outputLabel value="Pharmacy Collection"/>
                </f:facet>
                <p:column style="text-align: left;">
                    <f:facet name="header">
                        <h:outputLabel value="Department Name"/>
                    </f:facet>
                    <h:outputLabel value="#{dep.department.name}"/>
                </p:column>
                <p:column style="text-align: right;">
                    <f:facet name="header">
                        <h:outputLabel value="Value"/>
                    </f:facet>
                    <h:outputLabel value="#{dep.pharmacyDepartmentTotal}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>
                <p:columnGroup type="footer">
                    <p:row>
                        <p:column footerText="Total">
                            <f:facet name="footer">
                                <h:outputLabel value="Total"/>
                            </f:facet>
                        </p:column>
                        <p:column footerText="#{cashSummeryControllerExcel1.pharmacyTotal}" style="text-align: right;">
                            <f:facet name="footer">
                                <h:outputLabel value="#{cashSummeryControllerExcel1.pharmacyTotal}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>



            <p:spacer height="30"/>

            <p:dataGrid value="#{cashSummeryControllerExcel1.inwardCollection}" columns="1"
                        var="inw" rendered="#{cashSummeryControllerExcel1.inwardTot!=0}" 
                        paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">
                    Inward Collection
                </f:facet>                
                <p:dataTable id="ii" value="#{inw.bills}" var="b" rendered="#{inw.total!=0}" >
                    <f:facet name="header">
                        #{inw.admissionType.name}
                    </f:facet>
                    <p:column  headerText="BHT" >
                        #{b.patientEncounter.bhtNo}
                    </p:column>
                    <p:column headerText="Patient Name">
                        <h:outputLabel value="#{b.patientEncounter.patient.person.nameWithTitle}"/>                        
                    </p:column>
                    <p:column style="text-align: right;" headerText="Payment" >
                        <h:outputLabel value="#{b.netTotal}" >
                            <f:convertNumber pattern="#,##0.00"/>
                        </h:outputLabel>
                    </p:column>
                    <p:columnGroup type="footer">
                        <p:row>
                            <p:column colspan="2"  >
                                <f:facet name="footer">
                                    Total
                                </f:facet>
                            </p:column>
                            <p:column style="text-align: right;">
                                <f:facet name="footer">
                                    <h:outputLabel value="#{inw.total}" >
                                        <f:convertNumber pattern="#,##0.00"/>
                                    </h:outputLabel>
                                </f:facet>
                            </p:column>
                        </p:row>
                    </p:columnGroup>
                </p:dataTable>

            </p:dataGrid>



            <p:spacer height="30"/>
            <p:dataTable id="agent" value="#{cashSummeryControllerExcel1.agentCollections}" var="a" 
                         rendered="#{cashSummeryControllerExcel1.agentCollections.size()>0}" sortBy="#{a.institution.id}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">               
                    <p:outputLabel value="Agent Collection"/>                 
                </f:facet>
                <p:column headerText="Bill Id">
                    <h:outputLabel value="#{a.insId}"/>
                </p:column>
                <p:column headerText="Agent Name">
                    <h:outputLabel value="#{a.fromInstitution.name}" />
                </p:column>
                <p:column headerText="Agent Code">
                    <h:outputLabel value="#{a.fromInstitution.institutionCode}"/>
                </p:column>
                <p:column style="text-align: right;" headerText="Total">
                    <h:outputLabel value="#{a.netTotal}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>

                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="3" footerText="Total"/>
                        <p:column style="text-align: right;" footerText="#{cashSummeryControllerExcel1.agentCollectionTot}">
                            <f:facet name="footer">
                                <h:outputLabel value="#{cashSummeryControllerExcel1.agentCollectionTot}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>   
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>

            <p:spacer height="30"/>


            <p:dataTable id="creditCompany" value="#{cashSummeryControllerExcel1.creditCompanyCollections}" var="c"
                         rendered="#{cashSummeryControllerExcel1.creditCompanyCollections.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">
                    <p:outputLabel value="Credit Company Collection"/>    
                </f:facet>                               
                <p:subTable value="#{c.billItems}" var="b">

                    <p:column headerText="#{c.bill.fromInstitution.name}" style="width: 200px;">  
                        <p:outputLabel value="#{b.referenceBill.insId}(opd)" rendered="#{b.patientEncounter eq null}"/>
                        <p:outputLabel value="#{b.patientEncounter.bhtNo}(bht)" rendered="#{b.patientEncounter ne null}"/>
                    </p:column>                                    
                    <p:column headerText="Patient Name" style="width: 40%;">
                        <p:outputLabel value="#{b.referenceBill.patient.person.name}" rendered="#{b.patientEncounter eq null}"/>
                        <p:outputLabel value="#{b.patientEncounter.patient.person.name}" rendered="#{b.patientEncounter ne null}"/>
                    </p:column>                                    
                    <p:column headerText="Total" style="width: 200px;text-align: right;">
                        <h:outputLabel value="#{b.netValue}">
                            <f:convertNumber pattern="#,##0.00"/>
                        </h:outputLabel>
                    </p:column> 
                    <p:columnGroup type="footer">
                        <p:row>
                            <p:column colspan="2" footerText="Total"/>
                            <p:column style="text-align: right;">
                                <f:facet name="footer">
                                    <h:outputLabel value="#{c.bill.netTotal}">
                                        <f:convertNumber pattern="#,##0.00"/>
                                    </h:outputLabel>   
                                </f:facet>
                            </p:column>
                        </p:row>
                    </p:columnGroup>
                </p:subTable>

                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="2" footerText="Total Credit Company Collection"/>
                        <p:column style="text-align: right;" footerText="#{cashSummeryControllerExcel1.creditCompanyTotal}">
                            <f:facet name="footer">
                                <h:outputLabel value="#{cashSummeryControllerExcel1.creditCompanyTotal}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>   
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>


            <p:spacer height="30"/>


            <p:dataTable id="col"  value="#{cashSummeryControllerExcel1.collections2Hos}" var="sm" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <p:column >
                    <h:outputLabel value="#{sm.string}" ></h:outputLabel>
                </p:column>
                <p:column style="text-align: right;" >
                    <h:outputLabel value="#{sm.value}" >
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>
            </p:dataTable>

            <p:spacer height="30"/>

            <p:dataTable id="dept" value="#{cashSummeryControllerExcel1.departmentPayments}" var="a" 
                         rendered="#{cashSummeryControllerExcel1.departmentPayments.size()>0}"  
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">               
                    <p:outputLabel value="Professional Payment" />    
                </f:facet>
                <p:column>
                    <h:outputLabel value="#{a.department.name}" rendered="#{a.totalPayment!=0}"/>
                </p:column>
                <p:column style="text-align: right;">
                    <h:outputLabel value="#{0-a.totalPayment}" rendered="#{a.totalPayment!=0}" >
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>                
                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="1" footerText="Department Payment Total"/>
                        <p:column style="text-align: right;" footerText="#{0-cashSummeryControllerExcel1.doctorPaymentTot}">
                            <f:facet name="footer">
                                <h:outputLabel value="#{0-cashSummeryControllerExcel1.doctorPaymentTot}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>   
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>

            </p:dataTable>   


            <p:dataTable id="inwProf" value="#{cashSummeryControllerExcel1.inwardProfessions}" var="b" 
                         rendered="#{cashSummeryControllerExcel1.inwardProfessions.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">               
                    <p:outputLabel value="Inward Professional Payment" />    
                </f:facet>
                <p:column>
                    <h:outputLabel value="#{b.string}" rendered="#{b.value!=0}"/>
                </p:column> 
                <p:column style="text-align: right;">
                    <h:outputLabel value="#{0-b.value}" rendered="#{b.value!=0}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column> 
                <p:columnGroup type="footer">
                    <p:row>
                        <p:column>
                            <f:facet name="footer">
                                Total Inward Professions
                            </f:facet>
                        </p:column>
                        <p:column style="text-align: right;">
                            <f:facet name="footer">
                                <h:outputLabel value="#{0-cashSummeryControllerExcel1.inwardProfTot}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>

            <p:spacer height="30"/>

            <p:dataTable id="card" value="#{cashSummeryControllerExcel1.cardBill}" var="ch" sortBy="#{ch.billClass}" 
                         rendered="#{cashSummeryControllerExcel1.cardBill.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">              
                    <p:outputLabel value="Credit Card Transactions"/>    
                </f:facet>
                <p:column headerText="Bill No" style="width: 20%;">
                    <f:facet name="header">              
                        <p:outputLabel value="Bill No"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.insId}"/>                            
                </p:column>                            
                <p:column headerText="Credit Card No" >
                    <f:facet name="header">              
                        <p:outputLabel value="Credit Card No"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.creditCardRefNo}"/>                            
                </p:column>
                <p:column headerText="Bank">
                    <f:facet name="header">              
                        <p:outputLabel value="Bank"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.bank.name}" />                            
                </p:column>

                <p:column headerText="Total" style="width: 20%; text-align: right;">
                    <f:facet name="header">              
                        <p:outputLabel value="Total"/>    
                    </f:facet>
                    <h:outputLabel value="#{0-ch.netTotal}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>      
                </p:column>    

                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="3" footerText="Total" />
                        <p:column style="text-align: right;" footerText="#{0-cashSummeryControllerExcel1.cardTot}" >
                            <f:facet name="footer">
                                <h:outputLabel value="#{0-cashSummeryControllerExcel1.cardTot}" >
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>   
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>


            <p:spacer height="30"/>

            <p:dataTable id="slip" value="#{cashSummeryControllerExcel1.slipBill}" var="ch" sortBy="#{ch.billClass}" 
                         rendered="#{cashSummeryControllerExcel1.slipBill.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">

                    <p:outputLabel value="Slip Transactions"/>    
                </f:facet>
                <p:column headerText="Bill No"  style="width: 20%; text-align: right;" >
                    <f:facet name="header">
                        <h:outputLabel value="Bill No"/>
                    </f:facet>
                    <h:outputLabel value="#{ch.insId}" />                            
                </p:column>                        
                <p:column headerText="Invoice No" style="width: 20%; "> 
                    <f:facet name="header">
                        <h:outputLabel value="Invoice No"/>
                    </f:facet>
                    <h:outputLabel value="#{ch.comments}"/>                            
                </p:column>

                <p:column headerText="Bank">
                    <f:facet name="header">
                        <h:outputLabel value="Bank"/>
                    </f:facet>
                    <h:outputLabel value="#{ch.bank.name}"/>                            
                </p:column>
                <p:column headerText="Slip Date" style="width: 20%;"> 
                    <f:facet name="header">
                        <h:outputLabel value="Slip Date"/>
                    </f:facet>
                    <h:outputLabel value="#{ch.chequeDate}">                                
                        <f:convertDateTime pattern="dd MMMM yyyy"/>
                    </h:outputLabel>  
                </p:column> 
                <p:column headerText="Total" style="width: 20%; text-align: right;">
                    <f:facet name="header">
                        <h:outputLabel value="Total"/>
                    </f:facet>
                    <h:outputLabel value="#{-ch.netTotal}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>      
                </p:column>

                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="4" footerText="Total"/>
                        <p:column style="text-align: right;" footerText="#{0-cashSummeryControllerExcel1.slipTot}">
                            <f:facet name="footer">
                                <h:outputLabel value="#{0-cashSummeryControllerExcel1.slipTot}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>   
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>



            <p:spacer height="30"/>

            <p:dataTable id="cheque" value="#{cashSummeryControllerExcel1.chequeBill}" var="ch" sortBy="#{ch.billClass}" 
                         rendered="#{cashSummeryControllerExcel1.chequeBill.size()>0}" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">              
                    <p:outputLabel value="Cheque Transactions"/>    
                </f:facet>
                <p:column headerText="Bill No" style="width: 20%;">
                    <f:facet name="header">              
                        <p:outputLabel value="Bill No"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.insId}" />                            
                </p:column>                        
                <p:column headerText="Cheque No" style="width: 20%;">
                    <f:facet name="header">              
                        <p:outputLabel value="Cheque No"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.chequeRefNo}">                                
                    </h:outputLabel>                               
                </p:column>  
                <p:column headerText="Bank">
                    <f:facet name="header">              
                        <p:outputLabel value="Bank"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.bank.name}">                                   
                    </h:outputLabel>
                </p:column>
                <p:column headerText="Cheque Date" style="width: 20%;"> 
                    <f:facet name="header">              
                        <p:outputLabel value="Cheque Date"/>    
                    </f:facet>
                    <h:outputLabel value="#{ch.chequeDate}">
                        <f:convertDateTime pattern="dd MMMM yyyy"/>
                    </h:outputLabel>                               
                </p:column> 

                <p:column headerText="Total" style="text-align: right;">
                    <f:facet name="header">              
                        <p:outputLabel value="Total"/>    
                    </f:facet>
                    <h:outputLabel value="#{0-ch.netTotal}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                </p:column>

                <p:columnGroup type="footer">
                    <p:row>
                        <p:column colspan="4" footerText="Total"/>
                        <p:column style="text-align: right;" footerText="#{0-cashSummeryControllerExcel1.chequeTot}">
                            <f:facet name="footer">
                                <h:outputLabel value="#{0-cashSummeryControllerExcel1.chequeTot}">
                                    <f:convertNumber pattern="#,##0.00"/>
                                </h:outputLabel>   
                            </f:facet>
                        </p:column>
                    </p:row>
                </p:columnGroup>
            </p:dataTable>



            <p:spacer height="30"/>

            <p:dataTable id="finalSum" value="#{cashSummeryControllerExcel1.finalSumery}" var="s" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <p:column>
                    <h:outputLabel value="#{s.string}"/>
                </p:column>
                <p:column style="text-align: right;">
                    <h:outputLabel value="#{s.value}" rendered="#{s.value!=0}">
                        <f:convertNumber pattern="#,##0.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="................" rendered="#{s.value==0}"/>
                </p:column>
            </p:dataTable>

            <p:spacer height="30"/>


            <p:dataTable value="#{cashSummeryControllerExcel1.bankingData}" var="b" 
                         paginator="false"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15,20">
                <f:facet name="header">
                    <h:outputLabel value="Bank Deposit" />
                </f:facet>
                <p:column >
                    <h:outputLabel value="#{b.string}"/>
                </p:column>
                <p:column style="text-align: right;" >
                    <h:outputLabel value="......................." />
                </p:column>
            </p:dataTable>

        </h:form>
    </ui:define>


</ui:composition>
 